<?php


namespace app\admin\validate;

class Role extends Base
{
    protected $rule =   [
        'id'  => 'require',
        'ids'  => 'require',
        'nickname'  => 'require',
        'status' => 'require',
    ];

    protected $message  =   [
        'id.require' => 'id必须',
        'ids.require' => 'ids必须',
        'nickname.require' => '角色昵称必须',
        'status.require' => '状态必须',
    ];


    protected $scene = [
        'insert'  =>  ['nickname'],
        'update'  =>  ['id','nickname','status'],
        'detail'  =>  ['id'],
        'status'  =>  ['ids', 'status'],
        'del'  =>  ['ids'],
        'clean'  =>  ['ids'],
    ];
}